<extend name="Users:layout" />
<block name="content">
<script>

</script>
    <div class="wst-body"> 
       <div class='wst-page-header'>买家中心 > 已取消订单</div>
       <div class='wst-page-content'>
        <div style="padding-bottom:4px;">
          订单编号:<input id="orderNo" value="{$params['orderNo']}" style="width:80px;" autocomplete="off"/>
          店铺名称:<input id="shopName" value="{$params['shopName']}" style="width:80px;" autocomplete="off"/>
          收货人:<input id="userName" value="{$params['userName']}" style="width:80px;" autocomplete="off"/>
          <!--  
          下单日期:<input id="sdate" value="{$params['sdate']}" style="width:80px;"/>-<input id="edate" value="{$params['edate']}" style="width:80px;"/>
          -->
          
          <button class="wst-btn-query" onclick="javascript:getOrdersList(5)">查询</button>
        </div>
       <div class='wst-page-content'>
        <table class='wst-list' style="font-size:13px;">
           <thead>
             <tr>
               <th width='80'>订单编号</th>
               <th width='*'>商品信息</th>
               <th width='100'>商品类型</th>
               <th width='100'>店铺名称</th>
               <th width='100'>收货人</th>
               <th width='70'>订单金额</th>
               <th width='140'>下单时间</th>
               <th width='100'>状态</th>
               <th width='*'>原因</th>
               <th width='*'>操作</th>
             </tr>
           </thead>
           <tbody>
            <volist name="receiveOrders['root']" id="order" key='key1'>
             <tr>
              <td width='80' style="padding-top:10px;vertical-align:top;">{$order["orderNo"]}</td>
                <td width='*'>
          <!--积分订单只有一个商品-->
                <if condition="$order['shopId'] neq 0">
                  <volist name="order['goodslist']" id="goods" key='key2'>
                  <a href="{:U('Home/Goods/getGoodsDetails/',array('goodsId'=>$goods['goodsId']))}">
                    <img src="__ROOT__/{$goods['goodsThums']}" height="50" width="50" class='wst-goods-tb'/>
                  </a>
                </volist>
                  <else />
                  <volist name="order['goodslist']" id="goods" key='key2'>
                  <a href="{:U('Home/Integral/getGoodsDetails/',array('goodsId'=>$goods['goodsId']))}">
                    <img src="__ROOT__/{$goods['goodsThums']}" height="50" width="50" class='wst-goods-tb'/>
                  </a>
                </volist>
                </if>
        </td>
        <td width='100' style="padding-top:10px;vertical-align:top;">
            <if condition="$order['orderType'] eq 1">普通商品</if>
            <if condition="$order['orderType'] eq 2">秒杀商品</if>
            <if condition="$order['orderType'] eq 3">团购商品</if>
            <if condition="$order['orderType'] eq 4">积分商品</if>

        </td>
        <td width='100' style="padding-top:10px;vertical-align:top;"><if condition="$order['shopId'] neq 0">
              <a href="{:U('Home/Shops/toShopHome/',array('shopId'=>$order['shopId']))}" target="_blank">{$order["shopName"]}</a>
          <else />
              <a href="{:U('Home/index/index')}" style="color:#666" target="_blank">{$CONF['mallName']}</a>
          </if></td>
                <td width='100'>{$order["userName"]}</td>
                <td width='70'>{$order["needPay"]}<if condition="$order['payType'] neq 4">元<else />积分</if></td>
                <td width='140'><div style="line-height:20px;">{$order["createTime"]}</div></td>
                <td width='100'>
                    <if condition="$order['orderStatus'] eq -1">用户取消                
                    <elseif condition="$order['orderStatus'] eq -3"/>用户拒收
                    <elseif condition="$order['orderStatus'] eq -4"/>商户同意                         
                    <elseif condition="$order['orderStatus'] eq -5"/>商户不同意        
                    <elseif condition="$order['orderStatus'] eq -6"/>用户取消
                    <elseif condition="$order['orderStatus'] eq -7"/>用户取消                              
                    </if>
                </td>
                <td width='*'><if condition="$order['reason'] eq true">{$order["reason"]}<else />-</if></td>
                <td width='*' >
          <if condition="$order['shopId'] neq 0">
            <a href="javascript:;" onclick="showOrder('{$order["orderId"]}')">查看</a>
            <else />
            <a href="javascript:;" onclick="showIntegralOrders('{$order["orderId"]}')">查看</a>
          </if>
        </td>
             </tr>
             </volist>
             <if condition="$receiveOrders['totalPage'] gt 1">
             <tfoot>
             <tr>
                <td colspan='8' align='center' style="height:30px;border-bottom: 0px;">
          <div class="wst-page" style="float:right;padding-bottom:10px;">
            <div id="wst-page-items"></div>
          </div>
        </td>
             </tr>
             </tfoot>
             </if>
           </tbody>
        </table>
        </div>
    </div>
    <script>
    <if condition="$receiveOrders['totalPage'] gt 1">
    $(document).ready(function(){
    laypage({
        cont: 'wst-page-items',
        pages: {$receiveOrders['totalPage']}, //总页数
        skip: true, //是否开启跳页
        skin: '#e23e3d',
        groups: 3, //连续显示分页数
        curr: function(){ //通过url获取当前页，也可以同上（pages）方式获取
            var page = location.search.match(/pcurr=(\d+)/);
            return page ? page[1] : 1;
        }(), 
        jump: function(e, first){ //触发分页后的回调
            if(!first){ //一定要加此判断，否则初始时会无限刷新
              var nuewurl = WST.splitURL("pcurr");
              var ulist = nuewurl.split("?");
              if(ulist.length>1){
                location.href = nuewurl+'&pcurr='+e.curr;
              }else{
                location.href = '?pcurr='+e.curr;
              }
                
            }
        }
    });
    });
  </if>
  </script>
</block> 